import _extends from '@babel/runtime/helpers/esm/extends';
import _objectDestructuringEmpty from '@babel/runtime/helpers/esm/objectDestructuringEmpty';
import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';
import { Radio as AntdRadio } from 'antd';
import React from 'react';
import createField from '../../../createField';
var SingleRadio = function SingleRadio(_ref) {
  var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
  return /*#__PURE__*/ React.createElement(AntdRadio, _objectSpread({}, rest));
};
export default createField(SingleRadio, {
  defaultDetailComponent: function defaultDetailComponent(props) {
    return /*#__PURE__*/ React.createElement(
      AntdRadio,
      _objectSpread(
        _objectSpread({}, props),
        {},
        {
          disabled: true,
        },
      ),
    );
  },
  defaultFormItemProps: {
    valuePropName: 'checked',
    // @ts-ignore
    getValueFromEvent: function getValueFromEvent(event) {
      return event.target.checked;
    },
  },
});
